import request from '@/utils/request';

// 查询广告分类/位置-分页
export function pageAdvertCategory(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/advert/pageAdvertCategory`,
    method: 'post',
    data: params
  });
}

// 查询广告
export function pageAdvert(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/advert/pageAdvert`,
    method: 'post',
    data: params
  });
}

// 更新广告
export function updateAdvert(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/advert/updateAdvert`,
    method: 'post',
    data: params
  });
}

// 删除广告
export function deleteAdvert(id) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/advert/deleteAdvert`,
    method: 'DELETE',
    params: id
  });
}

// 保存广告
export function saveAdvert(params) {
  return request({
    url: process.env.VUE_APP_BASIC_API + `/advert/saveAdvert`,
    method: 'post',
    data: params
  });
}

// 获取用户列表
export function getOpEndUserDto(params) {
  return request({
    url: `/adminUser/getOpEndUserDto`,
    method: 'post',
    data: params
  });
}

// 获取用户资料
export function getUserInfo(userId) {
  return request({
    url: `/adminUser/getUserInfo?userId=${userId}`,
    method: 'get'
  });
}

// 获取推荐名师列表
export function getTeacherOpRecommendUser(params) {
  return request({
    url: `/adminUser/getTeacherOpRecommendUser`,
    method: 'post'
  });
}

// 推荐名师-保存
export function saveTeacherOpRecommendUser(params) {
  return request({
    url: `/adminUser/saveTeacherOpRecommendUser`,
    method: 'post',
    params: params
  });
}

// 推荐名师-修改
export function updateTeacherOpRecommendUser(params) {
  return request({
    url: `/adminUser/updateTeacherOpRecommendUser`,
    method: 'post',
    params: params
  });
}

// 推荐名师-删除
export function deleteTeacherOpRecommendUser(params) {
  return request({
    url: `/adminUser/deleteTeacherOpRecommendUser`,
    method: 'post',
    params: params
  });
}
